home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / ularn / patch1 < prev    next >
Encoding:
Text File  |  1989-07-13  |  11.4 KB  |  465 lines

  1. Path: uunet!zephyr!tektronix!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v07i009:  ularn - ultra-larn, an enhancement of the larn adventure game, Patch1
  5. Message-ID: <4222@tekred.CNA.TEK.COM>
  6. Date: 12 Jul 89 13:25:41 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 454
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: "Philip A. Cordier" <philc@sco.COM>
  12. Posting-number: Volume 7, Issue 9
  13. Archive-name: ularn/Patch1
  14. Patch-To: ularn: Volume 7, Issue 1-8
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then unpack
  18. # it by saving it into a file and typing "sh file".  To overwrite existing
  19. # files, type "sh file -c".  You can also feed this as standard input via
  20. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  21. # will see the following message at the end:
  22. #        "End of shell archive."
  23. # Contents:  patches01
  24. # Wrapped by billr@saab on Mon Jul 10 13:53:34 1989
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'patches01' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'patches01'\"
  28. else
  29. echo shar: Extracting \"'patches01'\" \(9852 characters\)
  30. sed "s/^X//" >'patches01' <<'END_OF_FILE'
  31. X*** /dev/null    Mon Jul 10 13:45:01 1989
  32. X--- README.patch    Mon Jul 10 13:52:14 1989
  33. X***************
  34. X*** 0 ****
  35. X--- 1,57 ----
  36. X+ 
  37. X+ 
  38. X+ 7/9/89
  39. X+ 
  40. X+     Several small problems with the distribution of Ularn have cropped
  41. X+     up, and I've put together several patches.  To apply, you'll need 
  42. X+     Larry Wall's "patch" program (if you don't have it and can't
  43. X+     find it anywhere, you should be able to make the modifications
  44. X+     by hand from the descriptions below). These should be applied to 
  45. X+     the unmodified sources as distributed by the comp.sources.games
  46. X+     moderator.
  47. X+ 
  48. X+ -Phil Cordier
  49. X+ philc@sco.COM  
  50. X+ ...!uunet!sco!philc
  51. X+ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  52. X+ 
  53. X+ FILE:    header.h
  54. X+ CHANGE:    move "#include <sys/timeb.h>" to after #ifdef BSD
  55. X+ FIXES:    file not found message for those SYSV implentations that don't
  56. X+     have the BSD <sys/timeb.h> file.
  57. X+ 
  58. X+ FILE:     main.c          
  59. X+ CHANGE: all "<=26" to "<26"
  60. X+ FIXES:    problem with junk on screen after doing an inventory
  61. X+ 
  62. X+ FILE:     nap.c           
  63. X+ CHANGE: comment out stuff after "#else"
  64. X+ FIXES:    error messages from picky compilers
  65. X+ 
  66. X+ FILE:     to_ansi.c       
  67. X+ CHANGE:    add explicit "exit(0)" before end of main()
  68. X+ FIXES:    unless explicit succesfull return value is there, some compilers
  69. X+     return whatever is on top of the stack - if non-zero, 'make' bombs
  70. X+     out.
  71. X+ 
  72. X+ FILE:     tok.c        
  73. X+ CHANGE:    add an ioctl to flush input buffer for those who don't have the 
  74. X+     POSIX tcflush() function.
  75. X+ FIXES:    unresolved external message for those without POSIX stuff.
  76. X+ 
  77. X+ FILE:     scores.c        
  78. X+ CHANGE: change first call of "scbr()" to "clearvt100()" in died()
  79. X+ FIXES:    restores all initial terminal settings - EOF will now correctly 
  80. X+     be <control>-D instead of <control>-A after playing the game.
  81. X+ 
  82. X+ FILE:    Makefile
  83. X+ CHANGE:    $(UTIL) to ./$(UTIL) in actions for Umaps
  84. X+ FIXES:    If you run 'make install' as root, it will fail when it tries
  85. X+     to run 'to_ansi <Uhelp.no_control >Uhelp' because "." is not in root's
  86. X+     PATH. Fix by adding explicit "./" before the "to_ansi" call.
  87. X+ CHANGE: $(UTIL_OBJ) to $(UTIL_SRC) in production for $(UTIL)
  88. X+ FIXES:    Some systems complain about not being able to find to_ansi.o.
  89. X+ 
  90. X+ FILE:    store.c
  91. X+ CHANGE: add a loop to zero out gemvalue array before selling a stone
  92. X+ FIXES:  bug allowing you to sell a gemstone multiple times
  93. X*** header.h.orig    Thu Jun 29 06:28:23 1989
  94. X--- header.h    Mon Jul 10 09:22:06 1989
  95. X***************
  96. X*** 1,9 ****
  97. X  /*    header.h */
  98. X  #include <sys/types.h>
  99. X  #include <sys/stat.h>
  100. X- #include <sys/timeb.h>
  101. X  
  102. X  #ifdef BSD
  103. X  #    include <sys/time.h>
  104. X  #    include <sgtty.h>
  105. X  #else
  106. X--- 1,9 ----
  107. X  /*    header.h */
  108. X  #include <sys/types.h>
  109. X  #include <sys/stat.h>
  110. X  
  111. X  #ifdef BSD
  112. X+ #    include <sys/timeb.h>
  113. X  #    include <sys/time.h>
  114. X  #    include <sgtty.h>
  115. X  #else
  116. X*** main.c.orig    Thu Jun 29 06:28:41 1989
  117. X--- main.c    Mon Jul 10 09:22:07 1989
  118. X***************
  119. X*** 269,275 ****
  120. X          srcount++; 
  121. X      }
  122. X  
  123. X!     for (k=0; k<=26; k++)
  124. X          if (iven[k]) show3(k);
  125. X  
  126. X      lprintf("\nElapsed time is %d.  You have %d mobuls left",
  127. X--- 269,275 ----
  128. X          srcount++; 
  129. X      }
  130. X  
  131. X!     for (k=0; k<26; k++)
  132. X          if (iven[k]) show3(k);
  133. X  
  134. X      lprintf("\nElapsed time is %d.  You have %d mobuls left",
  135. X***************
  136. X*** 320,326 ****
  137. X      srcount=0;
  138. X  
  139. X      /* count number of items we will display */
  140. X!     for (count=2,j=0; j<=26; j++)     
  141. X         if (i=iven[j])
  142. X          switch(i) {
  143. X              case OLEATHER:    
  144. X--- 320,326 ----
  145. X      srcount=0;
  146. X  
  147. X      /* count number of items we will display */
  148. X!     for (count=2,j=0; j<26; j++)     
  149. X         if (i=iven[j])
  150. X          switch(i) {
  151. X              case OLEATHER:    
  152. X***************
  153. X*** 339,345 ****
  154. X      t_setup(count);
  155. X  
  156. X      for (i=22; i<93; i++)
  157. X!          for (j=0; j<=26; j++)
  158. X             if (i==iven[j])
  159. X              switch(i) {
  160. X                  case OLEATHER:    
  161. X--- 339,345 ----
  162. X      t_setup(count);
  163. X  
  164. X      for (i=22; i<93; i++)
  165. X!          for (j=0; j<26; j++)
  166. X             if (i==iven[j])
  167. X              switch(i) {
  168. X                  case OLEATHER:    
  169. X***************
  170. X*** 368,374 ****
  171. X      sigsav=nosignal;  nosignal=1; /* don't allow ^c etc */
  172. X      srcount=0;
  173. X  
  174. X!      for (count=2,j=0; j<=26; j++)    /* count how many items */
  175. X         if (i=iven[j])
  176. X          switch(i) {
  177. X              case ODIAMOND:  case ORUBY:  case OEMERALD:  
  178. X--- 368,374 ----
  179. X      sigsav=nosignal;  nosignal=1; /* don't allow ^c etc */
  180. X      srcount=0;
  181. X  
  182. X!      for (count=2,j=0; j<26; j++)    /* count how many items */
  183. X         if (i=iven[j])
  184. X          switch(i) {
  185. X              case ODIAMOND:  case ORUBY:  case OEMERALD:  
  186. X***************
  187. X*** 390,396 ****
  188. X      t_setup(count);
  189. X  
  190. X      for (i=22; i<93; i++)
  191. X!          for (j=0; j<=26; j++)
  192. X             if (i==iven[j])
  193. X              switch(i) {
  194. X                  case ODIAMOND:  case ORUBY:  
  195. X--- 390,396 ----
  196. X      t_setup(count);
  197. X  
  198. X      for (i=22; i<93; i++)
  199. X!          for (j=0; j<26; j++)
  200. X             if (i==iven[j])
  201. X              switch(i) {
  202. X                  case ODIAMOND:  case ORUBY:  
  203. X***************
  204. X*** 419,425 ****
  205. X      sigsav=nosignal;  nosignal=1; /* don't allow ^c etc */
  206. X      srcount=0;
  207. X  
  208. X!     for (count=2,j=0; j<=26; j++)
  209. X          switch(iven[j]) {
  210. X              case OBOOK:    
  211. X              case OSCROLL:    
  212. X--- 419,425 ----
  213. X      sigsav=nosignal;  nosignal=1; /* don't allow ^c etc */
  214. X      srcount=0;
  215. X  
  216. X!     for (count=2,j=0; j<26; j++)
  217. X          switch(iven[j]) {
  218. X              case OBOOK:    
  219. X              case OSCROLL:    
  220. X***************
  221. X*** 428,434 ****
  222. X      t_setup(count);
  223. X  
  224. X      for (i=22; i<84; i++)
  225. X!          for (j=0; j<=26; j++)
  226. X             if (i==iven[j])
  227. X              switch(i) {
  228. X                  case OBOOK:    
  229. X--- 428,434 ----
  230. X      t_setup(count);
  231. X  
  232. X      for (i=22; i<84; i++)
  233. X!          for (j=0; j<26; j++)
  234. X             if (i==iven[j])
  235. X              switch(i) {
  236. X                  case OBOOK:    
  237. X***************
  238. X*** 451,457 ****
  239. X      nosignal=1; /* don't allow ^c etc */
  240. X      srcount=0;
  241. X  
  242. X!     for (count=2,j=0; j<=26; j++)
  243. X          switch(iven[j]) {
  244. X              case OCOOKIE:    
  245. X                  count++;
  246. X--- 451,457 ----
  247. X      nosignal=1; /* don't allow ^c etc */
  248. X      srcount=0;
  249. X  
  250. X!     for (count=2,j=0; j<26; j++)
  251. X          switch(iven[j]) {
  252. X              case OCOOKIE:    
  253. X                  count++;
  254. X***************
  255. X*** 459,465 ****
  256. X      t_setup(count);
  257. X  
  258. X      for (i=22; i<84; i++)
  259. X!          for (j=0; j<=26; j++)
  260. X             if (i==iven[j])
  261. X              switch(i) {
  262. X                  case OCOOKIE:    
  263. X--- 459,465 ----
  264. X      t_setup(count);
  265. X  
  266. X      for (i=22; i<84; i++)
  267. X!          for (j=0; j<26; j++)
  268. X             if (i==iven[j])
  269. X              switch(i) {
  270. X                  case OCOOKIE:    
  271. X***************
  272. X*** 481,487 ****
  273. X      nosignal=1; /* don't allow ^c etc */
  274. X      srcount=0;
  275. X  
  276. X!     for (count=2,j=0; j<=26; j++)
  277. X          switch(iven[j]) {
  278. X              case OPOTION:    
  279. X                  count++;
  280. X--- 481,487 ----
  281. X      nosignal=1; /* don't allow ^c etc */
  282. X      srcount=0;
  283. X  
  284. X!     for (count=2,j=0; j<26; j++)
  285. X          switch(iven[j]) {
  286. X              case OPOTION:    
  287. X                  count++;
  288. X***************
  289. X*** 489,495 ****
  290. X      t_setup(count);
  291. X  
  292. X      for (i=22; i<84; i++)
  293. X!       for (j=0; j<=26; j++)
  294. X           if (i==iven[j])
  295. X          switch(i) {
  296. X              case OPOTION:    
  297. X--- 489,495 ----
  298. X      t_setup(count);
  299. X  
  300. X      for (i=22; i<84; i++)
  301. X!       for (j=0; j<26; j++)
  302. X           if (i==iven[j])
  303. X          switch(i) {
  304. X              case OPOTION:    
  305. X***************
  306. X*** 1129,1135 ****
  307. X      char gack[26];
  308. X  
  309. X      cursors();
  310. X!     for (j=0; j<=26; j++)
  311. X          switch(iven[j]) {
  312. X              case OPOTION:    gack[i++] = j;
  313. X          };
  314. X--- 1129,1135 ----
  315. X      char gack[26];
  316. X  
  317. X      cursors();
  318. X!     for (j=0; j<26; j++)
  319. X          switch(iven[j]) {
  320. X              case OPOTION:    gack[i++] = j;
  321. X          };
  322. X***************
  323. X*** 1164,1170 ****
  324. X      else if (!strcmp(str, "eat")) e = 1;
  325. X      else if (!strcmp(str, "drop")) d = 1;
  326. X  
  327. X!     for (j=0; j<=26; j++) {
  328. X          switch(iven[j]) {
  329. X          case OSWORDofSLASHING :
  330. X          case OHAMMER:
  331. X--- 1164,1170 ----
  332. X      else if (!strcmp(str, "eat")) e = 1;
  333. X      else if (!strcmp(str, "drop")) d = 1;
  334. X  
  335. X!     for (j=0; j<26; j++) {
  336. X          switch(iven[j]) {
  337. X          case OSWORDofSLASHING :
  338. X          case OHAMMER:
  339. X*** nap.c.orig    Thu Jun 29 06:28:16 1989
  340. X--- nap.c    Mon Jul 10 09:22:08 1989
  341. X***************
  342. X*** 96,102 ****
  343. X      }
  344. X  }
  345. X  #    endif /* SIGVTALARAM */
  346. X! #  else not BSD
  347. X  napms(time) 
  348. X  int time; 
  349. X  {
  350. X--- 96,102 ----
  351. X      }
  352. X  }
  353. X  #    endif /* SIGVTALARAM */
  354. X! #  else /* not BSD */
  355. X  napms(time) 
  356. X  int time; 
  357. X  {
  358. X*** scores.c.orig    Thu Jun 29 06:28:57 1989
  359. X--- scores.c    Mon Jul 10 09:22:09 1989
  360. X***************
  361. X*** 670,676 ****
  362. X          return; /* only case where died() returns */
  363. X      }
  364. X  invalid:
  365. X!     sncbr();
  366. X      f = 0;
  367. X      if (ckpflag) 
  368. X          unlink(ckpfile);    /* remove checkpoint file if used */
  369. X--- 670,676 ----
  370. X          return; /* only case where died() returns */
  371. X      }
  372. X  invalid:
  373. X!     clearvt100();
  374. X      f = 0;
  375. X      if (ckpflag) 
  376. X          unlink(ckpfile);    /* remove checkpoint file if used */
  377. X*** to_ansi.c.orig    Thu Jun 29 08:00:13 1989
  378. X--- to_ansi.c    Mon Jul 10 09:22:10 1989
  379. X***************
  380. X*** 23,26 ****
  381. X--- 23,27 ----
  382. X          } else
  383. X              putc((char)c, stdout);
  384. X      }
  385. X+     exit(0);
  386. X  }
  387. X*** tok.c.orig    Thu Jun 29 06:28:02 1989
  388. X--- tok.c    Mon Jul 10 09:22:11 1989
  389. X***************
  390. X*** 49,63 ****
  391. X                      exit(0); 
  392. X                  }
  393. X              }
  394. X! #ifdef BSD
  395. X!         /* if keyboard input buffer is too big, flush some of it */
  396. X!         do {
  397. X!             ioctl(0,FIONREAD,&ic);
  398. X!             if (ic>flushno)   
  399. X!                 read(0,&cc,1);
  400. X!         }
  401. X!         while (ic>flushno);
  402. X! #endif
  403. X          if (read(0,&cc,1) != 1) 
  404. X              return(lastok = -1);
  405. X  
  406. X--- 49,55 ----
  407. X                      exit(0); 
  408. X                  }
  409. X              }
  410. X!         flushall();
  411. X          if (read(0,&cc,1) != 1) 
  412. X              return(lastok = -1);
  413. X  
  414. X***************
  415. X*** 113,121 ****
  416. X          } /* gobble up the byte */
  417. X      }
  418. X  #else /* SYSV */
  419. X! #  ifdef unix
  420. X!     tcflush(0, TCIFLUSH);        /* unix SYSV only, not XENIX */
  421. X! #  endif /* unix */
  422. X  #endif /* BSD */
  423. X  }
  424. X  
  425. X--- 105,115 ----
  426. X          } /* gobble up the byte */
  427. X      }
  428. X  #else /* SYSV */
  429. X! #  ifdef TCIFLUSH
  430. X!     tcflush(0, TCIFLUSH);        /* SYSV w/POSIX 1003 tcflush() */
  431. X! #  else
  432. X!         ioctl(0, TCFLSH);        /* standard ioctl */
  433. X! #  endif /* TCIFLUSH */
  434. X  #endif /* BSD */
  435. X  }
  436. X  
  437. X*** /dev/null    Mon Jul 10 09:30:02 1989
  438. X--- patchlevel.h    Mon Jul 10 09:34:48 1989
  439. X***************
  440. X*** 0 ****
  441. X--- 1 ----
  442. X+ #define PATCHLEVEL    1
  443. X*** store.c.orig    Thu Jun 29 06:29:01 1989
  444. X--- store.c    Mon Jul 10 13:46:21 1989
  445. X***************
  446. X*** 536,541 ****
  447. X--- 536,544 ----
  448. X  
  449. X      if (level==8) c[TELEFLAG] = 0;
  450. X  
  451. X+       for(i = 0; i < 26; i++)
  452. X+           gemvalue[i] = 0;
  453. X+ 
  454. X      for (k=i=0; i<26; i++)
  455. X          switch(iven[i]) {
  456. X          case OLARNEYE: 
  457. END_OF_FILE
  458. if test 9852 -ne `wc -c <'patches01'`; then
  459.     echo shar: \"'patches01'\" unpacked with wrong size!
  460. fi
  461. # end of 'patches01'
  462. fi
  463. echo shar: End of shell archive.
  464. exit 0
  465.